<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>表单</title>
</head>
<body>
<div>
<form action="">
    <label for="name">姓名</label>
    <input id="name" type="text" placeholder="姓名">
    <label for="sex">性别</label>
    <select name="" id="sex">
        <option value="">男</option>
        <option value="">女</option>
    </select>
    <label for="des">简介</label>
    <textarea id="des">简介。。。</textarea>
    <input type="submit" value="提交">
</form>
</div>
<style>
    body{

    }
    input ,select ,textarea{
        display: inline-block;
        padding: 12px 20px;
        width: 100%;
        margin:8px 0;
        border: 1px solid gray;
        border-radius: 4px;
        box-sizing: border-box;

    }
    input[type=submit]{
        background-color: green;
    }
    input[type=submit]:hover{
        background-color: greenyellow;
    }
    div{

        border-radius: 5px;
        background-color: #f2f2f2;
        padding: 20px;
    }
    input[type=text]:focus{
        background-color: greenyellow;
        width: 100%;
    }
    input[type=text]{
        background-image: url("http://static.runoob.com/images/mix/searchicon.png");
        background-repeat: no-repeat;
        background-position: 10px 10px;
        transition: width 0.4s ease-in-out;
        width: 50%;
    }
    select{
        background-color: gainsboro;
    }


</style>
</body>
</html>